package cn.com.greatwall.common.lock;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author herw
 * @Time 2022-01-05 18:15:21
 * @Version 1.0
 * @Description: 锁对象抽象
 */
@AllArgsConstructor
public class ZLock implements AutoCloseable {
    @Getter
    private final Object lock;
    
    private final DistributedLock locker;
    
    @Override
    public void close() throws Exception {
        locker.unlock(lock);
    }
}
